let ax,ay,az,bx,by,bz,tag;
$(()=>{
    $("#gen").click(()=>{
        ax=parseInt($("#ax").val());
        ay=parseInt($("#ay").val());
        az=parseInt($("#az").val());
        bx=parseInt($("#bx").val());
        by=parseInt($("#by").val());
        bz=parseInt($("#bz").val());
        tag=$("#tag").val();
        let t;
        if (ax>bx){t=ax;ax=bx;bx=t;}
        if (ay<by){t=ay;ay=by;by=t;}
        if (az>bz){t=az;az=bz;bz=t;}
        $("#code1").text(`gamemode a @a[x=${ax},y=${ay},z=${az},dx=${bx-ax},dy=${by-ay},dz=${bz-az},tag=!${tag},m=!a]`);
        $("#code2").text(`gamemode s @a[x=${ax-1},y=${ay-1},z=${az-1},dx=0,dy=${by-ay+2},dz=${bz-az+2},m=a]`);
        $("#code3").text(`gamemode s @a[x=${bx+1},y=${ay-1},z=${az-1},dx=0,dy=${by-ay+2},dz=${bz-az+2},m=a]`);
        $("#code4").text(`gamemode s @a[x=${ax-1},y=${ay-1},z=${az-1},dx=${bx-ax+2},dy=${by-ay+2},dz=0,m=a]`);
        $("#code5").text(`gamemode s @a[x=${ax-1},y=${ay-1},z=${bz+1},dx=${bx-ax+2},dy=${by-ay+2},dz=0,m=a]`);
        $("#code6").text(`gamemode s @a[x=${ax-1},y=${ay-1},z=${az-1},dx=${bx-ax+2},dy=0,dz=${bz-az+2},m=a]`);
        $("#code7").text(`gamemode s @a[x=${ax-1},y=${by+1},z=${az-1},dx=${bx-ax+2},dy=0,dz=${bz-az+2},m=a]`);
        $("#code8").text(`title @a[x=${ax},y=${ay},z=${az},dx=${bx-ax},dy=${by-ay},dz=${bz-az},tag=!${tag},m=!a] actionbar 你进入了§a${tag}§f的领地，你没有权限修改该领地中的方块。`);
        $("#main").show();
    });
});